<template>
  <div>
    <template v-if="pvalue.widget=='Selection'">
      <Selection2Many
        v-model="pvalue"
        :model="modelname"
      />
    </template>
    <template v-else>

    </template>
  </div>
</template>

<script>
  import Vue from 'vue'
  import Selection2Many from '../ctrls/Selection2Many'
  // import { Dialog } from 'element-ui'
// Vue.use(Dialog)

export default {
  name: 'Field2Many',
  components: {  Selection2Many },
  filters: {
    statusFilter (status) {
      const statusMap = {
        published: 'success',
        draft: 'info',
        deleted: 'danger'
      }
      return statusMap[status]
    }
  },
  props: {
    modelname: { type: String, default: '' },
    id: { type: Number, default: 0 },
    domain: {
      type: Array,
      default () {
        return []
      }
    }
  }, inject: ['value'],
  data () {
    return {
    }
  },
  computed: {
    pvalue: function () {
      return this.value
    }
  },
  mounted: function () {
  },
  methods: {}
}
</script>

<style scoped>
  .edit-input {
    padding-right: 100px;
  }

  .cancel-btn {
    position: absolute;
    right: 15px;
    top: 10px;
  }
</style>
